package com.manage.system.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统部门表
 * </p>
 *
 * @author zhangqing
 * @since 2021-03-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysDept implements Serializable {

    @TableId
    private Long id;

    /**
     * 父部门id
     */
    private Long parentId;

    /**
     * 祖级id(用于数据权限过滤)
     */
    private String ancestors;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 排序顺序
     */
    private int orderNum;

    /**
     * 部门状态（1正常 0停用）
     */
    private Boolean status;

    /**
     * 删除标志（0代表存在 1代表删除）
     */
    private Boolean delFlag;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createStaff;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateStaff;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String remark;


    public static final String ID = "id";

    public static final String PARENT_ID = "parent_id";

    public static final String ANCESTORS = "ancestors";

    public static final String DEPT_NAME = "dept_name";

    public static final String ORDER_NUM = "order_num";

    public static final String LEADER_ID = "leader_id";

    public static final String STATUS = "status";

    public static final String DEL_FLAG = "del_flag";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

    public static final String REMARK = "remark";

}
